Integrand size = 14, antiderivative size = 66 \[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=a x+i b x-\frac {2 b \sqrt {x} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {i b \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3824, 3800, 2221, 2317, 2438} \[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=a x+\frac {i b \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {2 b \sqrt {x} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+i b x \]
[In]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 3800
Rule 3824
Rubi steps \begin{align*} \text {integral}& = a x+b \int \tan \left (c+d \sqrt {x}\right ) \, dx \\ & = a x+(2 b) \text {Subst}\left (\int x \tan (c+d x) \, dx,x,\sqrt {x}\right ) \\ & = a x+i b x-(4 i b) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right ) \\ & = a x+i b x-\frac {2 b \sqrt {x} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {(2 b) \text {Subst}\left (\int \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d} \\ & = a x+i b x-\frac {2 b \sqrt {x} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {(i b) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2} \\ & = a x+i b x-\frac {2 b \sqrt {x} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {i b \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2} \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.00 \[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=a x+i b x-\frac {2 b \sqrt {x} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {i b \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2} \]
[In]
[Out]
\[\int \left (a +b \tan \left (c +d \sqrt {x}\right )\right )d x\]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (51) = 102\).
Time = 0.27 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.32 \[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {2 \, a d^{2} x - 2 \, b d \sqrt {x} \log \left (-\frac {2 \, {\left (i \, \tan \left (d \sqrt {x} + c\right ) - 1\right )}}{\tan \left (d \sqrt {x} + c\right )^{2} + 1}\right ) - 2 \, b d \sqrt {x} \log \left (-\frac {2 \, {\left (-i \, \tan \left (d \sqrt {x} + c\right ) - 1\right )}}{\tan \left (d \sqrt {x} + c\right )^{2} + 1}\right ) - i \, b {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (d \sqrt {x} + c\right ) - 1\right )}}{\tan \left (d \sqrt {x} + c\right )^{2} + 1} + 1\right ) + i \, b {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (d \sqrt {x} + c\right ) - 1\right )}}{\tan \left (d \sqrt {x} + c\right )^{2} + 1} + 1\right )}{2 \, d^{2}} \]
[In]
[Out]
\[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int \left (a + b \tan {\left (c + d \sqrt {x} \right )}\right )\, dx \]
[In]
[Out]
\[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int { b \tan \left (d \sqrt {x} + c\right ) + a \,d x } \]
[In]
[Out]
\[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int { b \tan \left (d \sqrt {x} + c\right ) + a \,d x } \]
[In]
[Out]
Time = 3.95 (sec) , antiderivative size = 150, normalized size of antiderivative = 2.27 \[ \int \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=a\,x-\frac {b\,\left (\pi \,\ln \left (\cos \left (d\,\sqrt {x}\right )\right )+2\,c\,\ln \left ({\mathrm {e}}^{-d\,\sqrt {x}\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}+1\right )-\pi \,\ln \left ({\mathrm {e}}^{-d\,\sqrt {x}\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}+1\right )-\ln \left (\cos \left (c+d\,\sqrt {x}\right )\right )\,\left (2\,c-\pi \right )-\pi \,\ln \left ({\mathrm {e}}^{d\,\sqrt {x}\,2{}\mathrm {i}}+1\right )+d^2\,x\,1{}\mathrm {i}+\mathrm {polylog}\left (2,-{\mathrm {e}}^{-d\,\sqrt {x}\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}+2\,d\,\sqrt {x}\,\ln \left ({\mathrm {e}}^{-d\,\sqrt {x}\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}+1\right )+c\,d\,\sqrt {x}\,2{}\mathrm {i}\right )}{d^2} \]
[In]
[Out]